Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cypress Updates] App analytics updates #2261

Merged
merged 10 commits into from
Dec 5, 2024

Conversation

ritvibhatt
Copy link
Contributor

@ritvibhatt ritvibhatt commented Nov 22, 2024

Description

  1. Update cypress tests for app analytics
  2. Update to use savedObjects client to delete saved visualizations in applications
  3. Add back visualization action menu
Screenshot 2024-11-21 at 4 50 00 PM

Visualization action menu:
Screenshot 2024-12-04 at 3 01 06 PM

Issues Resolved

#1886

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ritvibhatt ritvibhatt marked this pull request as ready for review December 3, 2024 22:56
@@ -432,11 +435,12 @@ describe('Viewing application', () => {
cy.get('[data-test-subj="app-analytics-configTab"]').click();
cy.get('select').select(visOneName);
cy.intercept('PUT', `**/api/observability/application`).as('selectUpdate');
cy.wait('@selectUpdate')
cy.wait(2000); // despite the previous wait grabbing the call that updates the panel select, it doesn't appear without this
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why the tests now work without this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test now reloads the home page after changing the availability which also makes the applications update properly

@@ -479,8 +483,7 @@ describe('Separate from other plugins', () => {
cy.visit(
`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/`
);
cy.get('[data-test-subj="operationalPanelsActionsButton"]', { timeout: timeoutDelay }).click();
cy.get('[data-test-subj="addSampleContextMenuItem"]', { timeout: timeoutDelay }).click();
cy.get('.euiButtonContent').contains('Add samples').click();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this element have a data-test-subj?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not

Copy link
Collaborator

@paulstn paulstn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work fixing the tests! Regarding the changes to the component files, are there also some bug fixes and features in this PR? If so, could you put them in the description?

@ps48 ps48 merged commit 9c94bc9 into opensearch-project:main Dec 5, 2024
18 of 23 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-2261-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9c94bc96f38bf048e36f417e51e6710f85bb5e7f
# Push it to GitHub
git push --set-upstream origin backport/backport-2261-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-2261-to-2.x.

ritvibhatt added a commit to ritvibhatt/dashboards-observability that referenced this pull request Dec 5, 2024
* update cypress testing for app analytics

Signed-off-by: Ritvi Bhatt <[email protected]>

* replace wait

Signed-off-by: Ritvi Bhatt <[email protected]>

* change action menu for metrics

Signed-off-by: Ritvi Bhatt <[email protected]>

* update snapshots

Signed-off-by: Ritvi Bhatt <[email protected]>

* wait for service entities and trace groups to load

Signed-off-by: Ritvi Bhatt <[email protected]>

* load deleted applications

Signed-off-by: Ritvi Bhatt <[email protected]>

* remove deleted applications from table without reload

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix deleting saved visualizations

Signed-off-by: Ritvi Bhatt <[email protected]>

* type in applications to delete

Signed-off-by: Ritvi Bhatt <[email protected]>

---------

Signed-off-by: Ritvi Bhatt <[email protected]>
Co-authored-by: Ritvi Bhatt <[email protected]>
(cherry picked from commit 9c94bc9)
TackAdam added a commit that referenced this pull request Dec 6, 2024
* update cypress testing for app analytics

Signed-off-by: Ritvi Bhatt <[email protected]>

* replace wait

Signed-off-by: Ritvi Bhatt <[email protected]>

* change action menu for metrics

Signed-off-by: Ritvi Bhatt <[email protected]>

* update snapshots

Signed-off-by: Ritvi Bhatt <[email protected]>

* wait for service entities and trace groups to load

Signed-off-by: Ritvi Bhatt <[email protected]>

* load deleted applications

Signed-off-by: Ritvi Bhatt <[email protected]>

* remove deleted applications from table without reload

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix deleting saved visualizations

Signed-off-by: Ritvi Bhatt <[email protected]>

* type in applications to delete

Signed-off-by: Ritvi Bhatt <[email protected]>

---------

Signed-off-by: Ritvi Bhatt <[email protected]>
Co-authored-by: Ritvi Bhatt <[email protected]>
(cherry picked from commit 9c94bc9)

Co-authored-by: Adam Tackett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants